home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / SourceCode / MiscKit1.7.1 / MiscKit / Palettes / MiscSwapKitPalette / MiscSwapKit.subproj / MiscSwapViewByMatrix.m < prev    next >
Encoding:
Text File  |  1995-04-12  |  1.3 KB  |  47 lines

  1. /* MiscSwapViewByMatrix.m                 
  2.  *
  3.  * This is a SwapView that can handle swapping triggered by objects inside
  4.  * a matrix. Sorry no multiple buttons inside a matrix. (Actually, you can
  5.  * do multiple buttons.. see test.nib)
  6.  *
  7.  * For more interface-info see the header file. More in depth information
  8.  * can be found here in the source-code.
  9.  *
  10.  * Written by:         Thomas Engel
  11.  * Created:            24.01.1994 (Copyleft)
  12.  * Last modified:     25.09.1994
  13.  * Copyright (C) 1995 Thomas Engel
  14.  */
  15.  
  16. #import <misckit/MiscSwapViewByMatrix.h>
  17.  
  18. @implementation MiscSwapViewByMatrix
  19.  
  20. - swapContentView:sender
  21. {
  22.     // The trigger (sender) can either be the matrix (on behalf of one 
  23.     // of it's cells) or you one of the cells itself. Therefore we have 
  24.     // to check.
  25.     
  26.     if ([sender isKindOf: [Cell class] ])
  27.         return [super swapContentView: sender];
  28.     else
  29.         return [super swapContentView:[sender selectedCell]];
  30. }
  31.  
  32. @end
  33.  
  34. /*
  35.  * History: 25.09.94 Adjusted swapContentView: to work with either the
  36.  *                     matrix or cell as the trigger.
  37.  *
  38.  *            24.02.94 Made it conform to the new swapView methods.
  39.  *
  40.  *            24.01.94 Made it MiscSwap conform.
  41.  *
  42.  *            08.01.94 Derived from the basic swapController to serve the need
  43.  *                     to handle different buttons inside a scrollable matrix.
  44.  *
  45.  *
  46.  * Bugs: Not here!
  47.  */